package datatypes.film;

import java.util.ArrayList;
import java.util.List;

public class filmActors {
	List<filmActor> film_actors;

	public filmActors() {
		this.film_actors = new ArrayList<filmActor>();
	}

	public filmActors(filmActor film_actor) {
		this.film_actors = new ArrayList<filmActor>();
		this.film_actors.add(film_actor);
	}

	public filmActors(List<filmActor> film_actors) {
		this.film_actors = new ArrayList<filmActor>();
		this.film_actors.addAll(film_actors);
	}

	public void addActor(filmActor film_actor) {
		this.film_actors.add(film_actor);
	}
	
	public List<filmActor> getFilmActors(){
		return this.film_actors;
	}
	
	public String toString() {
		StringBuilder sb = new StringBuilder();
		int actorIndex = 1;
		for (filmActor film_actor : film_actors) {
			sb.append("actor <" + actorIndex++ + ">: \n");
			sb.append(film_actor.toString() + "\n");
		}

		return sb.toString();
	}
}
